import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class Credits here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Credits extends ScrollWorld
{
    
    private GreenfootSound button= new GreenfootSound("button-1.mp3");
    private buttonB btnB=new buttonB();
    /**
     * Crea la pantalla de creditos
     * 
     */
    public Credits()
    {    
        // Create a new world with 600x400 cells with a cell size of 1x1 pixels.
        super(600, 400,1,600, 400);
        addObject(btnB,310,350);
    }
    public void act()
    {
    menu();
    }
    
    /**
     * Despliega un boton donde te regresara al menu del juego
     * 
     */
    public void menu()
    {
        MouseInfo m = Greenfoot.getMouseInfo();
        button.setVolume(40);
        
        if(Greenfoot.mousePressed(btnB))
         {
          button.play();      
          
          Greenfoot.setWorld(new menu());
         }
         
    }
    
   
}
